<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'mortgageCategoryItem.label', default: 'MortgageCategoryItem')}"/>
    <title>编辑贷款细类</title>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA</li>
                    <li class="active">
                        <span><g:link action="index">贷款细类列表</g:link></span>
                    </li> 
                    <li>
                        编辑贷款细类
                    </li> 
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                编辑贷款细类
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hblue">
            <div class="panel-heading">
                编辑贷款细类
            </div>

            <div class="panel-body form-horizontal">
                <g:form resource="${this.mortgageCategoryItem}" method="PUT">
                    <g:if test="${flash.message}">
                        <div class="message alert alert-info" role="status">${flash.message}</div>
                    </g:if>
                    <g:hasErrors bean="${this.mortgageCategoryItem}">
                        <ul class="errors" role="alert">
                            <g:eachError bean="${this.mortgageCategoryItem}" var="error">
                                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                                        error="${error}"/></li>
                            </g:eachError>
                        </ul>
                    </g:hasErrors>
                    
                    <div class="form-group">
                        <label class="col-md-5 control-label is-required">名称</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="name" id="name" value="${this.mortgageCategoryItem?.name}"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <label class="col-md-5 control-label is-required">编码</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="code" id="code" value="${this.mortgageCategoryItem?.code}"/>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <label class="col-md-5 control-label is-required">分类</label>
                        <div class="col-md-3">
                            <g:select class="form-control" name="type" id="type" from="${com.cindata.dictionary.MortgageCategory.list()}" optionKey="id" optionValue="name"
                                      value="${this.mortgageCategoryItem?.type?.id}" noSelection="${['': '请选择分类']}"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="update" value="保存"/>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
